


const koa = require("koa")
const app = new koa()
const server = require("koa-static")
const path = require("path")
const PORT = 8099
let ROOT = 'src'


if (process.env.npm_config_mode) {
    ROOT = "dist"
}


app
    .use(server(path.join(__dirname, `/${ROOT}`)))
    .listen(PORT, () => {
        console.log("开启成功", `http://localhost:${PORT}/`)
    })